import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  //获取到期结算日和实际占款天数
  calculation: (query) => api.get(`${config.interfaces.type1}NegotiatedBuyback/getAccurateDay`, query),
  //查询持仓分析数据
  getPosition: (query) => api.get(`${config.interfaces.type1}NegotiatedBuyback/getHoldInfo`, query),
  //获取在途信息
  getBuyBack: (query) => api.get(`${config.interfaces.type1}bondTrade/findByComcode`, query),
  //簿记修改获取在途信息
  getBookBuyBack: (query) => api.get(`${config.interfaces.type1}bondTrade/queryBytradeId`, query),
  //指令下达
  saveInstruction: (query) => api.post(`${config.interfaces.type1}bondTrade/saveInstruction`, query),
  //获取交易对手
  queryCounterparty: (query) => api.get(`${config.interfaces.type1}bondTrade/queryCounterparty`, query),
  //查询债券基础信息
  queryBondInfo: (query) => api.get(`${config.interfaces.type1}bondTrade/queryBondInfo`, query),
  // 簿记下达
  saveInstruction2: (query) => api.post(`${config.interfaces.type1}fundTrade/saveInstruction2`, query),
  //簿记下达 新接口
  saveOrderNew: (query) => api.post(`${config.interfaces.type14}api/v1/instruction/genInstruction/stock`, query),
  //验资验券接口
  onCheck: (query) => api.get(`${config.interfaces.type14}api/v1/instruction/instructionStatus/queryCheckStatus`, query),
  //查询簿记下达结果
  queryResult: (query) => api.get(`${config.interfaces.type14}api/v1/instruction/instructionStatus/queryBookStatus`, query),

};
